//
//  SMBaseNavigationController.m
//  ShoppingMall
//
//  Created by Demon on 2018/3/21.
//  Copyright © 2018年 Demon. All rights reserved.
//

#import "SMBaseNavigationController.h"

@interface SMBaseNavigationController ()

@end

@implementation SMBaseNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationBar setBarTintColor:[UIColor whiteColor]];
    self.navigationBar.tintColor = UIColorHex(999999);
//    [self.navigationBar.backItem setti]
    [self.navigationBar.backItem.backBarButtonItem setTitleTextAttributes:@{NSFontAttributeName:UIFONTSIZE(14)} forState:UIControlStateNormal];
}

- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
    if (self.childViewControllers.count > 0) { // 非根控制器
        // 设置返回按钮,只有非根控制器
        viewController.hidesBottomBarWhenPushed = YES;
    }
    [super pushViewController:viewController animated:animated];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
